﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SlideShowControl.ascx.cs"
  Inherits="ITViet.Web.Controls.SlideShowControl" %>
<%@ Register Assembly="DevExpress.Web.v9.1, Version=9.1.4.0, Culture=neutral, PublicKeyToken=5377c8e3b72b4073"
  Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dxpc" %>

<script type="text/javascript" src="../Scripts/mootools.js"></script>

<script type="text/javascript" src="../Scripts/slideshow.js"></script>

<div>
  <dxpc:ASPxPopupControl ID="pcSlideshow" ClientInstanceName="pcSlideshow" runat="server"
    BackColor="Transparent" Height="300px" Modal="True" PopupHorizontalAlign="WindowCenter"
    PopupVerticalAlign="WindowCenter" ShowHeader="False" ShowShadow="False" Width="400px">
    <ModalBackgroundStyle BackColor="Black" Cursor="pointer">
    </ModalBackgroundStyle>
    <ContentCollection>
      <dxpc:PopupControlContentControl runat="server">
        <div id="show" class="slideshow">
        </div>
      </dxpc:PopupControlContentControl>
    </ContentCollection>
    <Border BorderStyle="None" />
  </dxpc:ASPxPopupControl>
</div>

<script type="text/javascript">
  var ctrlSlideshow = null;
  function startSlideshow(data, folderPath) {
    if (ctrlSlideshow == null) {
      ctrlSlideshow = new Slideshow('show', data, { captions: true, controller: true, height: 300, hu: folderPath, thumbnails: true, width: 400, duration: 1000 });
    }
    else {
      ctrlSlideshow.load(data);
    }
    pcSlideshow.Show();
  }

  function stopSlideshow() {
    if (ctrlSlideshow)
      ctrlSlideshow.load('');
    pcSlideShow.Hide();
  }
  </script>

